'''
Created on Jul 26, 2012

@author: thomas_dao
'''
'''
Created on Jul 17, 2012

@author: daoxuandung
'''
from web.base import BaseHandler
from web import urls
from kid import util
import json
import logging
from google.appengine.ext import ndb

class GetPhotosHandler(BaseHandler):
    @ndb.synctasklet
    def get(self):
        url = self.request.params.get('url')
        photos = yield util.get_page_async(url)
        self.response.write(json.dumps(photos))
    
app = urls.app

def main():
    app.run()

if __name__ == '__main__':
    main()